/*
 * @Author: 高瑞寒 15932717091@163.com
 * @Date: 2022-05-07 16:14:23
 * @LastEditTime: 2022-05-07 22:57:13
 * @LastEditors: 高瑞寒 15932717091@163.com
 * @Description: 
 */
import { Navigate } from 'react-router-dom'
import About from '../pages/About'
import Home from '../pages/Home'
import News from '../pages/About/components/News'
import Message from '../pages/About/components/Message'
import Detail from '../pages/About/components/Detail'


const routers = [
  {
    path: '/',
    element: <Navigate to='/about'></Navigate>
  },
  {
    path: '/about',
    element: <Navigate to='message'></Navigate>
  },
  {
    path: '/home',
    element: <Home />
  },
  {
    path: '/about',
    element: <About />,
    children: [
      {
        path: 'message',
        element: <Message />
      },
      {
        path: 'news',
        element: <News />,
        children: [
          {
            // path: 'detail/:id/:title',
            path: 'detail',
            element: <Detail/>
          }
        ]
      }
    ]
  }
]
export default routers